home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PASCAL
/
1874.ZIP
/
T-TOOLS.ZIP
/
TOOLINFO.ASC
< prev
Wrap
Text File
|
1989-12-20
|
6KB
|
175 lines
TOOLINFO.ASC
,-----------------------------------------------------------,
| Turbo Tools |
| version 1.0 |
| for Turbo Pascal 4.0, 5.0 and 5.5 |
| Chuck Esterbrook |
| copyright 1989 |
| |
| SEE TOOLDOC.ASC FOR COMPLETE DOCUMENTATION TO TURBO TOOLS |
| DON'T FORGET TO REGISTER! |
'-----------------------------------------------------------'
COMPILER DIRECTIVES FOR ALL UNITS:
Turbo Pascal 4.0 B-,D+, F-,I-,L+,N-, R+,S+,T-,V-
5.0 A+,B-,D+,E-,F-,I-,L+,N-,O-,R+,S+, V-
5.5 A+,B-,D+,E-,F-,I-,L+,N-,O-,R+,S+, V-
FILES INSTALLED:
TOOLINFO.ASC this file!
TOOLDOC.ASC complete documentation for Turbo Tools
CRT2DEMO.PAS demonstration program for the units Crt2 and Keys
*.TPU Turbo Pascal Unit files for libraries
LIST OF UNITS:
unit Crt2
unit Input
unit StrFuncs
unit Keys
DESCRIPTION OF UNITS:
unit Crt2 library of screen routines
supplement to the Turbo Pascal Crt unit
unit Input input routines for integers and strings
replacements for Readln
unit Keys easy to remember constants that represent the ASCII
codes for keys like F1, DELETE, and HOME
unit StrFuncs string functions library
supplement to Turbo Pascal's string functions
INTERFACES OF THE UNITS:
unit Crt2;
interface
uses
crt,
dos;
type
CursorTypes = (CursorOff,NormalCursor,HalfCursor,FullCursor);
SetOfChar = set of char;
var
CursorState : CursorTypes;
ScrLength,
ScrWidth : byte;
VideoSeg : word;
function Center(st : string) : string;
function CanUseColor : boolean;
procedure Cursor(Mask : CursorTypes);
procedure DelChar(Count : byte);
procedure Frame(x1,y1,x2,y2,Top,Bottom,Left,Right : byte);
function GetKey(Acceptable : SetOfChar) : char;
function GetKeyUp(Acceptable : SetOfChar) : char;
function GlobalX : byte;
function GlobalY : byte;
procedure InsSpace(Count : byte);
procedure LowBeep;
procedure WriteLast(ch : char);
{-----------------------------------------------------------------------------}
unit Input;
interface
uses
crt,
Crt2;
const
MinShortInt = -128;
MaxShortInt = 127;
MinByte = 0;
MaxByte = 255;
MinInt = -32768;
{ MaxInt = 32767; Predefined in Turbo Pascal's System unit }
MinWord = 0;
MaxWord = 65535;
MinLongInt = -2147483468;
{ MaxLongInt = 2147483467; Predefined in Turbo Pascal's System unit }
AllChars : set of char = [#32..#254];
type
SetOfChar = set of char;
EscapeFlag = (CanEscape,NoEscape);
var
Escaped : boolean;
function ReadShortInt(Min,Max,Init : shortint; Field : byte;
EscapeBy,ExtEscape : SetOfChar) : shortint;
function ReadByte (Min,Max,Init : byte; Field : byte;
EscapeBy,ExtEscape : SetOfChar) : byte;
function ReadInteger (Min,Max,Init : integer; Field : byte;
EscapeBy,ExtEscape : SetOfChar) : integer;
function ReadWord (Min,Max,Init : word; Field : byte;
EscapeBy,ExtEscape : SetOfChar) : word;
function ReadLongInt (Min,Max,Init : longint; Field : byte;
EscapeBy,ExtEscape : SetOfChar) : longint;
function ReadStr(MaxLen : byte; Acceptable,EscapeBy,
ExtEscape : SetOfChar) : string;
{-----------------------------------------------------------------------------}
unit Keys;
interface
const
{ SINGLE CODE SPECIAL KEYS }
_Backspace _Enter _Escape _Tab _Extended
{ EXTENDED CODE SPECIAL KEYS }
_ShiftTab
_Up _CtrlUp _AltUp _Down _CtrlDown _AltDown
_Left _CtrlLeft _AltLeft _Right _CtrlRight _AltRight
_Home _CtrlHome _AltHome
_End _CtrlEnd _AltEnd
_PageUp _CtrlPageUp _AltPageUp
_PageDown _CtrlPageDown _AltPageDown
_Ins _CtrlIns _AltIns
_Del _CtrlDel _AltDel
_Ctr _CtrlCtr _AltCtr
_F1 .. _F12
_ShiftF1 .. _ShiftF12
_CtrlF1 .. _CtrlF12
_AltF1 .. _AltF12
_AltA .. _AltZ
_Alt0 .. _Alt9
{-----------------------------------------------------------------------------}
unit StrFuncs;
interface
function CopyEnd(st : string; x : byte) : string;
function DelOccurs(Find,Target : string; x : byte) : string;
function LowCase(ch : char) : char;
function LowStr(st : string) : string;
function PosOccur(Find,Target : string; n : byte) : byte;
function Occurs(Find,Target : string) : byte;
function Shave(st : string) : string;
function ShaveLead(st : string) : string;
function ShaveTrail(st : string) : string;
function UpStr(st : string) : string;
{----------------------------------------------------------------------------}
{ END OF TOOLINFO.ASC FOR TURBO TOOLS 1.0 (C) 1989 BY CHUCK ESTERBROOK }
{----------------------------------------------------------------------------}